package day1127_1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class D1 {
    public static void main(String[] args) throws  Exception{
        //1.  读取java类(Driver)买手机：     forName(Driver)
        Class.forName("com.mysql.cj.jdbc.Driver");
        //2.  网络连接：  getConnection(账号密码)
        Connection  conn= DriverManager.getConnection("jdbc:mysql://localhost:3306/big1_1120?serverTimezone=GMT%2B8&useSSL=false",
                "root","root");
        //3.  微信：        Statement stmt=.createStatement()
        Statement  stmt=conn.createStatement();
        //4.  发送SQL，执行SQL： stmt.execute(数据 SQL)  发送语音，播放语音
        stmt.execute("create table stu(id int,name  varchar(50))");
        conn.close();//5.   断开网络连接：  conn.close();
    }
}
